/**
 * Copyright(c) by JNet Smartware Group.
 * All rights reserved. Not distribution or redistribution without
 * any permission of JNet Smartware Group.
 * 
 * @author thuc
 * 2010/03/15
 */
package vn.smartware.co.commons;

import org.eclipse.swt.graphics.Color;
import org.eclipse.wb.swt.SWTResourceManager;

import vn.smartware.co.framework.plugin.LangResources;


/**
 * Client constant
 * @author thuctt
 */
public class Const {
	
	/**
	 * CHAR_CODE_DEFAULT It belongs to the OS
	 */
	public static final String CHAR_CODE_DEFAULT = System.getProperty("file.encoding");

	/**
	 * CHAR_CODE_JIS = "ISO2022JP
	 */
	public static final String CHAR_CODE_JIS = "ISO2022JP";

	/**
	 * CHAR_CODE_SJIS = "SHIFT-JIS"
	 */
	public static final String CHAR_CODE_SJIS = "SHIFT-JIS";

	/**
	 * CHAR_CODE_MS932 = "MS932"
	 */
	public static final String CHAR_CODE_MS932 = "MS932";

	/**
	 * LINE_FEED_DEFAULT
	 */
	public static final String LINE_FEED_DEFAULT = System.getProperty("line.separator");

	/**
	 * LINE_FEED_CRLF = "\r\n"
	 */
	public static final String LINE_FEED_CRLF = "\r\n";

	/**
	 * LINE_FEED_CR = "\r"
	 */
	public static final String LINE_FEED_CR = "\r";

	/**
	 * LINE_FEED_LF = "\n"
	 */
	public static final String LINE_FEED_LF = "\n";

	/**
	 * BLANK 
	 */
	public static final String BLANK = " ";
	
	/**
	 * COMMA
	 */
	public static final String COMMA = ",";
	
	/**
	 * DOUBLE_QUOTATION = (")
	 */
	public static final String DOUBLE_QUOTATION = "\"";
	
	/**
	 * LOG ext
	 */
	public static final String LOG_EXT = ".log";

	/**
	 * CSV ext
	 */
	public static final String CSV_EXT = ".csv";

	/**
	 * BAK ext
	 */
	public static final String BAK_EXT = ".bak";

	/**
	 * DAT ext
	 */
	public static final String DAT_EXT = ".dat";
	
	/**
	 * LOCK ext
	 */
	public static final String LOCK_EXT = ".lock";
	
	/**
	 * ZIP ext
	 */
	public static final String ZIP_EXT = ".zip";

	/**
	 * MODE_NEW = "NEW"
	 */
	public static final String MODE_NEW = LangResources.getText("MODE_NEW");
	
	/**
	 * MODE_EDIT = "MODIFY"
	 */
	public static final String MODE_EDIT = LangResources.getText("MODE_EDIT");
	
	/**
	 * MODE_DEL = "DELETE"
	 */
	public static final String MODE_DEL = LangResources.getText("MODE_DEL");

	/**
	 * COLON = ":"
	 */
	public static final String COLON = ":";

	/**
	 * UPDATE_SYMBOL = "[U]"
	 */
	public static final String UPDATE_SYMBOL = "[U]";
	
	/**
	 * INSERT_SYMBOL = "[A]
	 */
	public static final String INSERT_SYMBOL = " [+]";
	
	/**
	 * DELETE_SYMBOL = "[D]"
	 */
	public static final String DELETE_SYMBOL = " [-]";

	// ======== Key Code START ========================================//
	/**
	 * KEY_CODE_ENTER
	 */
	public static final String KEY_CODE_ENTER = "ENTER";
	
	/**
	 * KEY_CODE_ARROW_UP
	 */
	public static final String KEY_CODE_ARROW_UP = "ARROW_UP";
	
	/**
	 * KEY_CODE_ARROW_DOWN
	 */
	public static final String KEY_CODE_ARROW_DOWN = "ARROW_DOWN";
	
	/**
	 * KEY_CODE_ARROW_LEFT
	 */
	public static final String KEY_CODE_ARROW_LEFT = "ARROW_LEFT";
	
	/**
	 * KEY_CODE_ARROW_RIGHT
	 */
	public static final String KEY_CODE_ARROW_RIGHT = "ARROW_RIGHT";
	
	/**
	 * KEY_CODE_ESC
	 */
	public static final String KEY_CODE_ESC = "ESC";
	
	/**
	 * KEY_CODE_CTRL
	 */
	public static final String KEY_CODE_CTRL = "CTRL";
	
	/**
	 * KEY_CODE_ALT
	 */
	public static final String KEY_CODE_ALT = "ALT";
	
	/**
	 * KEY_CODE_SHIFT
	 */
	public static final String KEY_CODE_SHIFT = "SHIFT";
	
	/**
	 * KEY_CODE_COMMAND
	 */
	public static final String KEY_CODE_COMMAND = "COMMAND";
	
	/**
	 * KEY_CODE_F
	 */
	public static final String KEY_CODE_F = "'f'";
	
	 // ======== Key Code END ========================================//

	/**
	 * STATUS_EXISTED
	 */
	public static final String STATUS_EXISTED = "-1";
	
	/**
	 * COLOR_DATA_ROW_CHANGED
	 */
	public static final Color COLOR_DATA_ROW_CHANGED = SWTResourceManager.getColor(210, 255, 250);
	
	/**
	 * COLOR_DATA_CANCELED
	 */
	public static final Color COLOR_DATA_CANCELED = SWTResourceManager.getColor(255, 0, 0);
	
	// ======== Priviledge START ========================================//
	/**
	 * NO_PERMISSION = "0"
	 */
	public static final String NO_PERMISSION = "0";
	
	/**
	 * VIEW_PERMISSION = "1"
	 */
	public static final String VIEW_PERMISSION = "1";
	
	/**
	 * ALL_PERMISSION = "2"
	 */
	public static final String ALL_PERMISSION = "2";
	
	// ======== Priviledge END ========================================//
	
	/**
	 * ITEMID = "TableTreeItemID"
	 */
	public static final String ITEMID = "TableTreeItemID";
	
	/**
	 * @author thuc
	 * SYSTEM_CONFIG
	 */
	public static final class SYSTEM_CONFIG {
		
		/**
		 * PRG_DISPLAY_TYPE = "PRG_DISPLAY_TYPE"
		 */
		public static final String PRG_DISPLAY_TYPE = "PRG_DISPLAY_TYPE";
		
		/**
		 * JOB = "JOB"
		 */
		public static final String JOB = "JOB";
		
		/**
		 * RENT_TYPE = "RENT_TYPE"
		 */
		public static final String RENT_TYPE = "RENT_TYPE";
		
		/**
		 * RENT_TYPE_BY_HOUR = "1"
		 */
		public static final String RENT_TYPE_BY_HOUR = "1";
		
		/**
		 * RENT_TYPE_BY_NIGHT = "2"
		 */
		public static final String RENT_TYPE_BY_NIGHT = "2";
		
		/**
		 * RENT_TYPE_BY_DAY = "3"
		 */
		public static final String RENT_TYPE_BY_DAY = "3";
		
		/**
		 * ROOM_TYPE = "ROOM_TYPE"
		 */
		public static final String ROOM_TYPE = "ROOM_TYPE";
		
		/**
		 * ROOM_STATUS = "ROOM_STATUS"
		 */
		public static final String ROOM_STATUS = "ROOM_STATUS";
		
		/**
		 * ROOM_STATUS_FREE = "0"
		 */
		public static final String ROOM_STATUS_FREE = "0";
		
		/**
		 * ROOM_STATUS_BOOKED = "1"
		 */
		public static final String ROOM_STATUS_BOOKED = "1";
		
		/**
		 * ROOM_STATUS_IN_USE = "2"
		 */
		public static final String ROOM_STATUS_IN_USE = "2";
		
		/**
		 * MONEY_TYPE = "MONEY_TYPE"
		 */
		public static final String MONEY_TYPE = "MONEY_TYPE";
		
		/**
		 * DRINK_TYPE = "DRINK_TYPE"
		 */
		public static final String DRINK_TYPE = "DRINK_TYPE";
		
		/**
		 * RESERVE_STATUS = "RESERVE_STATUS"
		 */
		public static final String RESERVE_STATUS = "RESERVE_STATUS";
		
		/**
		 * RESERVE_STATUS_BOOKING = "1"
		 */
		public static final String RESERVE_STATUS_BOOKING = "1";
		
		/**
		 * RESERVE_STATUS_IN_USE = "2"
		 */
		public static final String RESERVE_STATUS_IN_USE = "2";
		
		/**
		 * RESERVE_STATUS_FINISHED = "3"
		 */
		public static final String RESERVE_STATUS_FINISHED = "3";
	}
	
	public static final class COMBO_KEY {
		/**
		 * KEY = "KEY"
		 */
		public static final String KEY = "KEY";
		
		/**
		 * HAS_BLANK = "HAS_BLANK"
		 */
		public static final String HAS_BLANK = "HAS_BLANK";
		
		/**
		 * VALUE = "VALUE"
		 */
		public static final String VALUE = "VALUE";
	}
}
